import { inject, injectable } from 'inversify'
import { PrismaClient } from '@prisma/client'
// 这里还要在封装一下,数据库方法
@injectable()
export class PrismaDB {

    // 定义一下这个属性，构造方法了里赋值
    prisma: PrismaClient
    constructor(
        @inject('PrismaClient') prismaClient: () => PrismaClient
    ) {
        this.prisma = prismaClient()
    }
}